Print control apparatus and method

ABSTRACT

This invention is targeted to realize preview displaying by using a system spooler. In the print system according to this invention, when an application program designates printing of a document, document data is spooled into EMF spool file  4.  At the same time, previewer  3  is started to transmit a printing image generation request to print processor  5.  The print processor  5  reads the data subjected to preview displaying out of the EMF spool file  4,  have printer graphic driver  6  generate image data that has an appropriate display size, and informs the name of the image data file to the previewer  8,  which then displays the image data.

FIELD OF THE INVENTION

The present invention relates to a print control apparatus having aso-called preview function which, for instance, displays a printingimage before print processing, a print control method, and a printingsystem.

BACKGROUND OF THE INVENTION

In general, there are two methods for acquiring a printing image anddisplaying the image on a screen before a printing operation. The firstmethod is to interpret a print command transmitted to a printer by acomputer connected to the printer, and develop the printing data inunits of C, M, Y, and K planes to be synthesized as a printing image.The second method is to transmit a print command from a host computer toa printer, and receive a printing image generated inside the printer-bythe host computer which then displays the image.

In addition, in a network environment, there are two more methods fordisplaying a printing image on a screen. The third method is tointerpret a print command transmitted to a printer by a printer serverwhich locally connects printers to provide the network with printerfunctions, and develop the printing data in units of C, M, Y and Kplanes to be synthesized as a printing image in the printer server. Thefourth method is to supply a printer or a printer server with a printcommand by a host computer, which requests the printer server or printerto perform printing through a network, then acquire from the printer aprinting image generated inside the printer or printer server by thehost computer through the network, and display the image.

Furthermore, in a printing system employing a computer whichincorporates Microsoft Windows® as an operating system, printing datagenerated by an application program or the like is stored in asystem-standard spool file. Therefore, the printing data stored in thespool file cannot be accessed freely. For this reason, a printer drivercomprises a preview function which enables an access to printing data byspooling the printing data in its unique form (unique spooling) andperforms printing-image generation for displaying a printing image(fifth method).

However, the above-described conventional art has the following problemsto be solved.

In the first and third methods where a host computer interprets a printcommand transmitted to a printer and generates a printing image,although extremely accurate printing image data can be obtained, thesize of image data increases in proportion to a printer resolution.Therefore, a large amount of storage area is necessary. This problemremains even in a case where a printer server generates a printing imagein a network environment.

Furthermore, in the second and fourth methods where a host computeracquires a printing image generated by a printer based on a printcommand, although extremely accurate printing image data can beobtained, the size of the image data increases in proportion to aprinter resolution. Therefore, not only a large amount of storage areais necessary, but also an increased amount of time is required fortransferring the printing image from the printer to the host computer.In the network environment, this not only increases the data transfertime, but also increases a network traffic, and may cause acommunication delay or disturbance.

Furthermore, in regard to the fifth method of using the unique spoolingfunction of a printer driver in a printing system employing a computerwhich incorporates Microsoft Windows® as an operating system (OS), sincethe fifth method has a low affinity to the OS, it is necessary tocontinuously develop the unique spooling function in accordance with afuture improvement or specification changes of the OS. Therefore, itraises a problem of an increased development cost.

SUMMARY OF THE INVENTION

The present invention has been proposed in view of the foregoingconventional art, and has as its object to provide a print controlapparatus, method, and printing system, which can efficiently executedisplaying of a high-quality preview image with a small storage area,and which has a simple configuration to suppress a development costwhile maintaining a high affinity to an operating system.

In order to attain the above object, the present invention has thefollowing configuration.

More specifically, the present invention provides a print controlapparatus having a function to temporarily store intermediate data to beoutputted in accordance with a print designation of document data. Theprint control apparatus comprises: preview means adapted to transmit animage generation request in response to the print designation in a casewhere screen display execution of a printing image is designated, anddisplay image data based on information related to image data generatedin accordance with the image generation request; image data generationmeans adapted to generate image data; and processor means adapted toread the temporarily stored intermediate data in accordance with theimage generation request to cause the image data generation means togenerate the image data, and inform the preview means of the informationrelated to the generated image data.

In the detailed description of the preferred embodiments, theaforementioned preview means corresponds to the previewer; the imagedata generation means corresponds to the printer graphic driver; and theprocessor means corresponds to the print processor.

It is preferable that the image generation request involves designationof a size or resolution of the image data to be generated, and theprocessor means causes the image data generation means to generate theimage data with the designated size or resolution.

Furthermore, it is preferable that the image generation request includesa page number subjected to image data generation in the document data,and the processor means reads the intermediate data to cause the imagedata generation means to generate image data which corresponds to thedesignated page number.

Furthermore, it is preferable that the image generation request includesa number of colors used in bitmap data to be stored in a printing imagefile, or a subtractive color process employed in bitmap data generation.

Furthermore, it is preferable that the processor means produces thedesignated number of files for storing the image data to be generated bythe image data generation means, and stores the image data generated bythe image data generation means in the files, and in a case where imagedata corresponding to the printing image designated for screen displayexecution is stored in the file, the preview means reads the image dataout of the file and displays the image data.

Furthermore, it is preferable that the preview means transmits aninquiry to the processor means as to whether or not printing datasubjected to printing is stored as intermediate data, and the processormeans returns a response to the inquiry to the preview means.

Furthermore, it is preferable that the preview means is included in aclient apparatus which transmits the print designation of document data,and the image data generation means and the processor means are includedin a server apparatus which is connected to a printing apparatus and theclient apparatus, and that the processor means supplies the previewmeans with the image data itself as information related to the generatedimage data.

Furthermore, it is preferable that the processor means reads thetemporarily stored intermediate data in accordance with a print startrequest, to cause the image data generation means to generate printingdata, and printing is performed by a printing apparatus based on thegenerated printing data.

Moreover, according to another aspect, the present invention provides aprint control apparatus comprising: a print setting processor includinga setting unit in a printer driver which supplies a printer withprinting data, the setting unit adapted to designate whether or not toexecute screen display of a printing image of a document; a printingpage processor adapted to generate printing page data by controlling aprocessing sequence of each page of the printing data of the documentbased on a setting of the print setting processor; an image generationprocessor adapted to generate bitmap data of the printing page data andsupplies the bitmap data to a printing unit; and a printing imagedisplay unit adapted to display the bitmap data as the printing image,and switch printing image display in accordance with a user input. In acase where screen display execution of the printing image is designatedin the print setting processor, the printing page processor generatesthe printing page data in accordance with a request from the printingimage display unit, the image generation processor stores the bitmapdata in a printing image file, and the printing image display unitdisplays the printing image on a screen by utilizing the printing imagefile.

Moreover, according to another aspect, the present invention provides aprint control apparatus comprising: an application program; a userinterface driver started for operation by a print event informed by aprinting system of an operating system which interprets a print commandtransmitted by the application program; a previewer started foroperation by the user interface driver; a print processor capable ofarranging in page unit printing data of each page of printing documentdata, which is transmitted by the application program, in a form of pagedescription language; and a printer graphic driver adapted to generateimage data. Herein, the application program generates printing documentdata; the user interface driver starts up the previewer in accordancewith a print event, informed by the printing system of the operatingsystem, based on a driver property set along with a print request of theprinting document data; the print processor generates printing page databy processing each page of the printing document data, and supplies thegenerated printing page data to the printer graphic driver; the printergraphic driver generates bitmap data of the printing page data andstores the generated bitmap data in a printing image file; and thepreviewer displays the bitmap data, stored in the printing image file,on a screen.

In an environment where a client computer is connected with a servercomputer by communications, it is preferable that the applicationprogram, the user interface driver, and the previewer operate on theclient computer, and that the print processor and the printer graphicdriver operate on the server computer.

Moreover, according to another aspect of the present invention, apreviewer which performs displaying of a printing image is started up byutilizing a print event notification from an operating system. Printingdata from an application program is stored by utilizing a standardspooling function. At the time of despooling the data, a print processornotifies a printer graphic driver to generate a printing image. Further,the print processor communicates with the previewer to acquire a printimage generation request, including a resolution or page numbernecessary to generate the printing image, notifies the resolution to theprinter graphic driver, and controls generation of printing page datathat corresponds to the requested page number. The printer graphicdriver converts the printing page data to a bitmap image to be stored ina printing image file as a preview image. The print processor returnsthe name of the completed printing image file to the previewer. Thepreviewer displays on a screen a preview image, stored in the printingimage file, in accordance with a response of the print processor. Inaccordance with a user operation, the previewer requests a printingimage of an arbitrary printing page to the print processor, and acquiresa new printing image to switch the display of the printing image. Also,the previewer requests a print start or a print stop to the printprocessor in accordance with a user operation, thereby designating astart or stop of print processing.

The print processor, which has received a print start request from thepreviewer, designates normal printing to the printer graphic driver, andsequentially generates printing page data from the first page to thelast page.

The printer graphic driver, which has received a normal printingdesignation from the print processor, converts the printing page data toa bitmap image, supplies the bitmap image to a printer, and completesthe normal print processing.

It is preferable that the preview means further transmits an inquiry tothe processor means as to a total number of pages to be outputted at thetime of actually printing the document data subjected to printing, andthe processor means returns a response to the inquiry to the previewmeans.

Moreover, according to another aspect, the present invention provides apreview apparatus comprising: preview image generation means adapted togenerate a preview image to be stored in a generation preview file;preview means adapted to cause displaying of a preview image to bestored in a reference preview file; and replacement means adapted toreplace a content of the reference preview file designated by thepreview means with a content of the generation preview file, after thepreview image generated by the preview image generation means is storedin the generation preview file.

Moreover, according to another aspect, the present invention provides apreview method utilizing a generation preview file which stores apreview image generated by preview image generation means and areference preview file which stores a preview image displayed by previewmeans, wherein after the preview image generated by the preview imagegeneration means is stored in the generation preview file, a content ofthe reference preview file designated by the preview means is replacedwith a content of the generation preview file.

Moreover, according to another aspect, the present invention provides apreview program utilizing a generation preview file which stores apreview image generated by preview image generation means and areference preview file which stores a preview image displayed by previewmeans, wherein after the preview image generated by the preview imagegeneration means is stored in the generation preview file, a content ofthe reference preview file designated by the preview means is replacedwith a content of the generation preview file.

Furthermore, according to another aspect, the present invention providesa preview method of a printer driver, performing previewing operationbased on printing data, which is supplied from an application programand spooled by a standard spool function of an operating system.

Furthermore, according to another aspect, the present invention providesa printer driver, comprising preview means adapted to perform previewingoperation based on printing data, which is supplied from an applicationprogram and spooled by a standard spool function of an operating system.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a block diagram showing a printing system according to thefirst and second embodiments of the present invention;

FIG. 2 is a flowchart showing a previewer startup processing of a userinterface driver according to an embodiment of the present invention;

FIGS. 3A and 3B are flowcharts showing a printing page processing of aprint processor according to the first embodiment of the presentinvention;

FIG. 4 is a view showing a user interface of a previewer according to anembodiment of the present invention;

FIG. 5 is a block diagram showing hardware of a printing systemaccording to an embodiment of the present invention;

FIG. 6 is a block diagram showing a printing system according to thesecond embodiment of the present invention;

FIGS. 7A and 7B are flowcharts showing a printing page processing of aprint processor according to the second embodiment of the presentinvention;

FIG. 8A is a flowchart showing processing of a previewer according to anembodiment of the present invention;

FIG. 8B shows a table storing a file name, a page number and aresolution of the page of a preview image.

FIG. 9 is a chart showing a sequence of a processing performed by theprinting system according to the first embodiment of the presentinvention;

FIG. 10 is a block diagram showing a printing system according to thethird embodiment of the present invention; and

FIGS. 11A and 11B are flowcharts showing a printing page processing of aprint processor according to the third embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

First Embodiment

Hereinafter, the first embodiment of the present invention is describedby using a concrete example.

FIG. 1 is a block diagram showing a data flow at the time of printingand print previewing in a printing system according to the firstembodiment of the present invention. Referring to FIG. 1, modulesrelated to the present invention are: the previewer 8 serving as aprinting-image display unit, user interface driver 3 having a functionfor starting up the previewer 8 and including a print setting processor,print processor 5 serving as a print page processor, and printer graphicdriver 6 serving as an image generation processor. The printer graphicdriver 6 not only transmits generated printing data to a printer throughan output function of an operating system, but also stores a file as adesignated file name. The printer graphic driver 6 can generate printingdata in a bitmap-data form or in a language processable by a printer. Toexecute previewing, a preview file 9, serving as a printing image file,is temporarily generated. Note in this embodiment, Windows provided byMicrosoft Corporation is employed as an operating system.

In the printing system shown in FIG. 1, printing data, e.g., a documentor the like, generated by an application program 1 in a host unit 101,e.g., a personal computer or the like, is temporarily stored asintermediate printing data in an EMF spool file 4 through a GDI 2, andconverted to bitmap data. The bitmap data is supplied from the host unit101 to the printer 7 for printing. Note that a document herein includestexts and data having graphic contents such as graphics, tables, orbitmap images, or data including graphic contents only.

The application program 1 is provided by an application program. The GDI2 is provided by an operating system. The user interface driver 3, printprocessor 5, printer graphic driver 6, and previewer 8 are provided by aprinter driver program supplied by a printer manufacturer.

Herein, the GDI is a graphic device interface that is a Windows graphicengine. The GDI is a module performing graphic processing, e.g., screendisplaying or printing, on Windows. The GDI receives a command from theapplication program, converts the command into a form interpretable by adevice driver (in this embodiment, a printer driver), and transmits itto the device driver.

The EMF is short for an Enhanced Meta File that is a logical storageform of rendering data in Windows. In an EMF spool file, printing datais stored in the EMF form. In the printing system of this embodiment, astandard spool function of the OS is used for preview displaying.

The user interface driver 3 generally provides functions for setting apaper size used in printing, a printing direction, and other attributes.In addition to the setting of attributes such as a paper size, the userinterface driver 3 in this embodiment comprises a print settingprocessor that provides a function for preview setting, which determineswhether or not a printing image is to be displayed in a display unitbefore print processing. Values set through the user interface driver 3are called printing conditions. A user can set printing conditions,including execution/non-execution of preview displaying, by using thefunction, provided by the print setting processor, on the user interfacescreen. When the printing conditions are changed by a user, the changedprinting condition is returned to the application program 1. In thisembodiment, assume that preview execution is set in the printingconditions, in other words, the preview setting included in the printingconditions is set to “preview display execution.” The printingconditions are stored in a file device, e.g., a magnetic disk or thelike, as a part of the EMF spool file 4, and are referred to by the userinterface driver 3 or print processor 5. The preview setting in theprinting conditions is realized by a flag indicative of e.g., “executionof preview display” or “non-execution of preview display”. Hereinafter,the state of “preview display” set in the preview setting will bereferred to as “preview display execution”.

<Brief Description of Preview Displaying Steps>

FIG. 9 is a chart showing a sequence of preview display processing inthe construction shown in FIG. 1 with respect to the first page and anext designated page of a document. In the following description,numbers in parentheses indicate reference numerals in FIG. 9.

When the application program 1 receives a designation to print adocument from a user, e.g., an operator or other programs, it transmitsa print start command (1001) through the GDI 2 to a printing system ofthe OS for printing the document. The GDI 2 informs the user interfacedriver 3 of a print start event (1002) transmitted by the applicationprogram 1. When the user interface driver 3 receives the print startevent, it starts up the previewer 8 (1003) if preview display executionis set. Meanwhile, if preview display execution is not set, thepreviewer 8 is not started, and normal print processing is performed. Inthe following description, the case where preview display execution isset will be described.

The application program 1 continues print processing by supplying theGDI 2 with the printing data of the document (1004). The printing datasupplied through the GDI 2 is stored in the EMF spool file 4 (1005).When the first page of the document's printing data is stored in the EMFspool file 4, the OS standard spooler starts up the print processor 5(1006).

The print processor 5 is a module which reads in page unit the printoutinformation and printing data from the EMF spool file 4 to generateprinting page data, and supplies the printing page data in page unit tothe printer graphic driver 6 through the GDI 2, when printing is to beexecuted in Windows. The print processor 5 in this embodiment, which isa module realizing the foregoing functions, serves also as the printpage processor, and has a function to acquire a printing imagegeneration request informed by the previewer 8 by communicating with thepreviewer 8. The printing image generation request includes informationnecessary for generating a printing image, e.g., a page number,resolution, and so on. Herein, the resolution designated is a resolutionor image size corresponding to the size of a displaying image, or aresolution or image size corresponding to a displaying capability of thedisplay device 12. For instance, in a case where an A-4 sizevertical-oriented document is to be entirely displayed on a screen of1600×1200 pixels, an image must be generated in a way that the verticallength of the image has about 1200 dots at most. If an image whosevertical length has 1200 pixels is displayed on a display device having100 dpi, the page of the document is displayed approximately in anoriginal size. As described above, the size of the image data to begenerated is designated in accordance with the displaying capability. Asa matter of course, if a display device is small, a small image size isdesignated accordingly. In a case of decreasing the display size, thedecreased size is designated as a size of the image to be generated.

When the print processor 5 is started by the OS standard spooler (1006),the print processor 5 reads the printing conditions from the EMF spoolfile 4 (1007) and determines whether or not to execute previewdisplaying. As mentioned above, preview display execution is set in thisdescription. A file name of the preview file 9 is first decided, and thefile name is informed through the GDI 2 to the printer graphic driver 6to notify the preview display processing. At the same time, the printprocessor 5 sends a print start request to the GDI 2 (1008, 1009). Next,when the print processor 5 receives the printing image generationrequest from the previewer 8, the print processor 5 generates an emptypreview file 9 (1011, 1012) and writes printing conditions of the pagenumber, on which preview displaying is requested, in the preview file 9(1013, 1014). Then, the print processor 5 reads the page of the documentdata necessary for printing-image generation from the EMF spool file 4(1015), and generates printing page data of the requested page number tobe supplied to the GDI 2 (1016). Printing page data is data for eachpage having a GDI command form, which is obtained by rearranging the EMFdata for each page read out of the EMF spool file 4 as necessary. Forinstance, EMF data corresponding to two pages, which is read out of theEMF spool file 4, is rearranged into one page of printing page data torealize the so-called 2-up function.

When the GDI 2 receives the print start request from the print processor5, the GDI 2 informs the user interface driver 3 of the print startevent transmitted by the print processor 5 (1010).

The printer graphic driver 6, serving as an image generation processor,generates bitmap data based on a graphic rendering command (1017), whichis generated by the GDI 2 based on the printing page data supplied bythe print processor 5. The printer graphic driver 6 additionally storesthe generated bitmap data in the preview file 9 as preview image data(1018), using the preview file name notified in advance by the printprocessor 5. When the printer graphic driver 6 completes generation ofthe requested preview image data, it notifies the completion as aresponse to the print processor 5 (1019).

After the printer graphic driver 6 completes storing the preview imagedata, the print processor 5 returns the file name of the preview file 9to the previewer 8 (1020). The preview file 9 includes the printingconditions stored by the print processor 5, and preview image datastored by the printer graphic driver 6.

The previewer 8 acquires from the preview file 9 the preview image datacorresponding to the requested page number and printing conditions ofthe page by using the preview file name returned by the print processor5 (1021), displays the preview image on the display device 12 serving asdisplay means, and obtains a preview image 11 (1022). The previewer 8,operated by a user through a user interface included in the previewershown in FIG. 4, repeats communication with the print processor 5 toacquire a preview image to be displayed next in accordance with the useroperation (1023). Note that the preview file may be eliminated when thepreview image is displayed, or a single preview file may be used byoverwriting the content until preview display processing is completed.

When a user designates displaying of another page through the userinterface, step 1011 and the subsequent steps are repeated.

As has been described above, by virtue of having the printer graphicdriver 6 generate not only printing data but also preview image data, itis possible to generate preview image data based on the printing dataspooled by an operating system. Furthermore, since preview image data isgenerated in designated page unit, the storage area necessary forstoring the preview image data is kept to one page at most, even in acase the image data has a highest resolution.

<Brief Description of Printing Steps>

Next, a description is provided on a case where a user designates aprint start in the previewer 8. The previewer 8 requests a print startto the print processor 5. The print processor 5 informs the printergraphic driver 6 through the GDI 2 that the request is an actualprinting, reads printing data of the application program 1 from the EMFspool file 4, and generates printing page data in page unit from thefirst physical page to the final physical page to be sequentiallysupplied to the GDI 2.

The printer graphic driver 6, to which actual printing has beeninformed, generates bitmap data from the graphic rendering commandgenerated by the GDI 2, converts the bitmap data to a print command, andsupplies it to the printer 7 through a data transmission unit (notshown). The printer 7, serving as an output device, performs printing onprinting paper based on the print command transmitted by the printergraphic driver 6, and a physical printing page 10 shown in FIG. 1, whichis a print result, is obtained.

Note in a case where “non-execution of preview display” is set in thepreview setting, the previewer 8 is not started. Instead, the printprocessor 5 requests a print start to the GDI 2, reads printing data ofthe application program 1 from the EMF spool file 4, and generatesprinting page data in page unit from the first physical page to thefinal physical page to be sequentially supplied to the GDI 2. Printingis completed without displaying a preview.

<Processing of User Interface Driver>

FIG. 2 is a flowchart showing a processing of starting up the previewer8 by the user interface driver 3 according to the first embodiment. Theuser interface driver 3 operates based on a print event informed by theGDI 2.

In step S1, it is determined whether or not the event is a print eventtransmitted by the application program 1. If it is not a print eventfrom the application program 1, the control ends. If it is a print eventtransmitted by the application program 1, the control proceeds to stepS2. Note that a print event not transmitted by the application program 1is, for instance, a print event transmitted by the print processor 5.

In step S2, the type of the print event is determined. If the printevent indicates a print start, the control proceeds to step S3. If theprint event indicates an event other than a print start, the controlends.

In step S3, the preview setting included in the printing conditions isreferred to determine whether or not preview display execution is set.If preview display execution is set, the control proceeds to step S4 tostart up the previewer, and the control ends. If preview displayexecution is not set, the control ends.

<Processing of Print Processor>

Print page processing of the print processor 5 according to the firstembodiment is described with reference to the flowcharts in FIGS. 3A and3B which show a print page processing of the print processor 5.

The print processor 5 is started up by the OS standard spooler toinitiate the steps in FIGS. 3A and 3B when the application program 1starts print processing and at least one page of document data is storedin the EMF spool file 4. In other words, the print page processingperformed by the print processor 5, shown in FIGS. 3A and 3B, isexecuted in units of print job.

In step S10, printing conditions of the print job is acquired from theEMF spool file. In step S11, it is determined whether or not previewdisplay execution is set in the printing conditions. If preview displayexecution is not set, the control proceeds to step S12 to perform normalprinting. If preview display execution is set, the control proceeds tostep S21 to perform preview processing.

<Preview Processing>

In step S21, a preview file 9 having an empty content is generated forstoring a preview image and its printing conditions, and the file nameis informed to the printer graphic driver 6.

In step S22, a print start is informed to the printing system of the OS(i.e., GDI 2).

In step S23, the print processor waits for a request from the previewer8. If there is a request, the control proceeds to step S24 for acquiringa request of the previewer 8. Herein, a request is realized by a messagehaving a predetermined form for communication between processes.

In step S25, the type of the request from the previewer 8 is determined.If it is a print start request, the control proceeds to step S35 toperform normal print processing. If it is not a print start request, thecontrol proceeds to step S26.

In step S35, the preview file 9 generated in step S21 is eliminated, andnormal print processing is performed in step S12.

In step S26, the type of the request from the previewer 8 is determined,and if it is a print stop request, the control proceeds to step S36 toterminate print processing of the print job. If it is not a print stoprequest, the control returns to step S27.

In step S36, the preview file 9 generated in step S21 is eliminated, andthe print processing of the print job ends in step S20.

In step S27, the type of the request from the previewer 8 is determined,and if it is a preview image generation request, the control proceeds tostep S28 to perform preview image generation processing. If it is not apreview image generation request, the control proceeds to step S34 toperform processing of other requests.

In step S34, processing is performed for a request other than the printstart request, print stop request, and preview image generation request,among various types of request from the previewer 8. For instance, ifthe total number of printable pages (total number of pages) isrequested, the total number of pages is prepared as a response to thepreviewer 8. For instance, if a request inquires whether or not theprinting data from the application program 1 is being spooled, a flagindicative of whether or not it is being spooled is prepared as aresponse to the previewer 8. After an appropriate response to therequest is generated, the response is transmitted to the previewer 8.Upon responding to the request, the control proceeds to step S23 to waitfor a request from the previewer.

The previewer 8 displays the total number of pages, acquired in responseto the request, in the field of “total number of pages” in FIG. 4 (inthe example in FIG. 4, 3 pages). In a case where a user clicks theright-end button of the four buttons 22 shown in FIG. 4, the final pageof the document is previewed since the total number of pages is known.

In step S28, the content of the request transmitted by the previewer 8is acquired, and information necessary to perform preview imagegeneration is obtained. Herein, the content of the request transmittedby the previewer 8 is, for instance, information about a page number ofprinting page data to be generated by the print processor 5, the numberof pixels in the horizontal and vertical lengths of the preview image tobe generated, a resolution of a preview image to be generated, or anumber of colors or subtractive color process employed in the previewimage generation. As a matter of course, the content of the request maybe any one of the aforementioned information, or a combination of pluralinformation. Note that the page number is essential information. Theinformation about the content of the acquired request is informed to theprinter graphic driver 6.

In step S29, the content of the preview file 9 is emptied, and printingconditions corresponding to the printing page data of the requested pagenumber is stored in the preview file 9.

In step S30, a one-page print start is informed to the OS printingsystem through the GDI 2.

In step S31, printing data is read out of the EMF spool file 4, andprinting page data corresponding to the page number requested by thepreviewer 8 is generated and transmitted to the GDI 2.

In step S32, one-page print completion is informed through the GDI 2 tothe OS printing system. Herein, the GDI 2 generates a graphic renderingcommand based on the printing page data, and transmits it to the printergraphic driver 6. The printer graphic driver 6 generates a bitmap imagebased on the graphic rendering command transmitted by the GDI 2, andadditionally stores the bitmap image in the preview file 9 as a previewimage.

In step S33, the file name of the preview file is transmitted inresponse to the preview image generation request from the previewer 8,and the control proceeds to step S23 to wait for the next request fromthe previewer 8. If any request is transmitted from the previewer 8, theabove-described processing is performed in accordance with the requestcontent.

<Print Processing>

In step S12, the print processor 5 informs the printer graphic driver 6of a start of actual print processing.

In step S13, it is determined whether or not a print start has alreadybeen informed to the OS printing system. If so, the control proceeds tostep S15 to perform printing of each page. If not, the control proceedsto step S14 to inform the OS printing system of a print start.

Steps S15 to S19 are looped until printing of each physical page isperformed to the final physical page. In step S19, if printing for allthe designated physical pages is not completed, printing processing of aphysical page continues in step S16. When printing for all thedesignated physical pages is completed, the control proceeds to step S20where print processing completion is informed to the OS printing system.

In step S16, a one-page print start is informed to the OS printingsystem.

In step S17, printing data is read out of the EMF spool file 4, andprinting page data corresponding to each physical page is generated.

In step S18, the one-page print completion is informed to the OSprinting system. The GDI 2 generates a graphic rendering command basedon the printing page data, and transmits it to the printer graphicdriver 6. The printer graphic driver 6 generates a bitmap image based onthe graphic rendering command transmitted by the GDI 2, and supplies itto the printer 7.

In step S20, print completion is informed to the OS printing system andthe control ends.

Print page processing of the print processor 5 shown in FIGS. 3A and 3Bis performed in the foregoing manner. Each time the print processor 5generates printing page data and informs the one-page print completionto the GDI 2 in step S32, the GDI 2 generates a graphic renderingcommand based on the printing page data and transmits it to the printergraphic driver 6. The printer graphic driver 6 generates bitmap databased on the graphic rendering command transmitted by the GDI 2. Thegenerated bitmap data is additionally stored in the preview file 9having a file name informed by the print processor 5 in step S21.

The previewer 8 acquires a preview image of a designated page numberfrom the preview file 9 having a file name transmitted by the printprocessor 5 in step S33, and displays the preview image 11 on thedisplay device 12.

Furthermore, each time the print processor 5 generates printing pagedata and informs one-page print completion to the GDI 2 in step S18, theprinter graphic driver 6 which has received an actual print processingnotice in step S12 generates bitmap data based on the printing pagedata, converts the bitmap data to a print command, and supplies it tothe printer 7 through a predetermined data transmission processing (notshown) for printing a physical page. Note that the printer graphicdriver 6, which may be capable of generating plural forms of printingdata, does not always generate printing data in a bitmap form, but maygenerate printing data in a designated form of language. However, thisis the printing data to be supplied to a printer. Therefore, a previewimage is generated in a bitmap form.

<User Interface>

FIG. 4 shows a user interface of the previewer 8. The previewer 8 servesboth as display means for displaying a preview image and a state of aprinting job or the like, and as input means for changing a displaymethod of the preview image. Operation buttons operated by a userinclude: the preview image page number switch buttons 22,enlargement/reduction designation field, print start button 20, andprint stop button 21. The previewer 8 converts a user operation to arequest and sends it to the print processor 5.

The screen shown in FIG. 4 is displayed when a print start is designatedafter preview setting is performed by the application program. The firstpage displayed in a preview display is an actual initial page of thedocument to be printed in accordance with the set printing conditions.The page number 1 is always assigned to this page. For instance, in acase where printing in reverse order is designated as the printingconditions, the preview image having the page number 1 corresponds tothe final page of the document, as printing is started from the finalpage of the document. The previewer 8 transmits to the print processor 5the page number 1 subjected to initial preview displaying, together witha preview image generation request. In accordance with an operation ofthe switch button 22, the previewer 8 increments or decrements the pagenumber subjected to preview displaying, and transmits the new pagenumber as well as a preview image generation request to the printprocessor 5. Note although a page number cannot be directly designatedin the example shown in FIG. 4, an input field for allowing a pagenumber designation may be provided, and a preview of the designated pagenumber may be displayed.

When the print start button 20 is clicked, a print start request isissued to the print processor 5. This is the print start requestdetermined in step S25 in FIG. 3B.

When the print stop button 21 is clicked, a print stop request is issuedto the print processor 5. This is the print stop request determined instep S26 in FIG. 3B.

<Hardware Construction of Printing System>

Next, a block diagram showing hardware of the printing system accordingto the first embodiment is described. FIG. 5 is a block diagramdescribing a construction of the printing system according to the firstembodiment.

Referring to FIG. 5, the CRT display device 101 displays a propertysetting window or the like provided by the user interface driver. TheCRTC 102 is a controller for the display device. The user interfacescreen shown in FIG. 4 is displayed on the CRT 101.

The data input device (KB) 103, e.g., a keyboard or the like, can set aprinting condition through, e.g., the user interface driver shown inFIG. 1. The keyboard controller (KBC) 104 controls the keyboard (KB)103.

The pointing device (PD) 105 can perform operation such as a print stopoperation or the like through, e.g., the user interface of the previewershown in FIG. 4. The pointing device controller (PDC) 106 controls thepointing device (PD) 105.

The CPU 107 controls the entire apparatus. The CPU 107 executes aprogram which realizes the steps shown in the flowcharts of FIGS. 2, 3A,and 3B.

ROM 108 stores a boot program or the like.

RAM 109 stores an OS, application program, and programs for a userinterface driver, printer preprocessor, or printer graphic driver, whichare related to the system construction shown in FIG. 1 and flowcharts inFIGS. 2, 3A, and 3B. The RAM 109 is also used as a work area. Note thatprograms including the user interface driver 3, previewer 8, printprocessor 5, and printer graphic driver 6 are collectively referred toas a printer driver program.

The hard disk device (HDD) 110 stores an OS, application program,printer driver program including the programs related to the systemconstruction shown in FIG. 1 and flowcharts in FIGS. 2, 3A, and 3B, fontdata, data file (preview file), and EMF spool file. The hard diskcontroller (HDC) 111 controls the hard disk device (HDD) 110.

The floppy disk device (FDD) 112, which is a driver for a portablestorage medium, is controlled by the floppy disk controller (FDC) 113.

The interface (I/F) 114 is connected to the printer device (PR) 115,e.g., an inkjet printer, through an interface cable.

Each of these devices is connected by the bus 116.

When the power of the printing system is turned on, the CPU 107 startsup in accordance with the boot program stored in the ROM 108, loads theOS from the hard disk device 110, and waits for a user operation. Whenthe user designates printing or changes in print setting of the printerdriver by the KB 103 or PD 105 through the application program, or whenan automatic startup is set, the printer driver program stored in thehard disk device 110 is loaded to the RAM 109 and executed. Theconstruction shown in FIG. 1 is realized by executing a commerciallyavailable operating system as well as the program shown in FIGS. 2, 3A,and 3B by the construction in FIG. 5.

<Effect of First Embodiment>

As described above, when the print processor 5 supplies the printergraphic driver 6 with printing page data, the print processor 5 informsas to whether or not to generate a preview image as well as informationnecessary to generate the preview image, then generates printing pagedata by reading printing data out of the EMF spool file 4, and theprinter graphic driver 6 generates a preview image that is a printingimage based on the printing page data. In other words, the printprocessor enables intervention between a preview request of thepreviewer and image data generation of the printer graphic driver, andenables the printer graphic driver the generation of image data to bedisplayed and transmission of the generated image data to the previewer.Accordingly, preview image generation can be performed by using astandard spool function of an operating system, and thereforemaintenance of the driver program is facilitated.

Furthermore, since a printing image does not need to be regeneratedbased on the print command transmitted to the printer 7, preview imagegeneration can be realized with a small storage area.

Second Embodiment

Hereinafter, the second embodiment of the present invention is describedby using a concrete example. FIG. 6 is a block diagram showing aprinting system as the second embodiment of the present invention. Thesecond embodiment is an example which employs a plurality of previewfiles in the printing system described in the first embodiment. Adifference between FIG. 6 and FIG. 1 is described hereinafter.

The preview file in the second embodiment includes two types: ageneration preview file 13 where the print processor 5 stores printingconditions and the printer graphic driver 6 additionally stores apreview image; and plural reference preview files 14 to which thepreviewer 8 refers for a preview image and its printing conditions. Theprint processor 5 according to the second embodiment communicates withthe previewer 8 to acquire the number of reference preview files 14 asinformation regarding a preview initialization request, and a pagenumber as well as a file number of the reference preview file 14 asinformation regarding a preview image generation request. Besides theabove-described difference, the preview file is similar to that of thefirst embodiment.

<Brief Description of Preview Displaying>

First, a file name of the generation preview file 13 is informed to theprinter graphic driver 6 through the GDI 2 to inform of the previewprocessing. The print processor 5, which receives a request from thepreviewer 8, writes printing conditions of the requested page number inthe generation preview file 13. Then, the print processor 5 reads thepage of the document data necessary for printing-image generation fromthe EMF spool file 4, and generates printing page data of the requestedpage number to be supplied to the GDI 2.

The printer graphic driver 6, serving as an image generation processor,additionally stores generated bitmap data in the generation preview file13, using the file name notified in advance by the print processor 5.

After the printer graphic driver 6 completes storing the preview imagedata in the generation preview file 13, the print processor 5 replacesthe content of the reference preview file 14, corresponding to thereference preview file number acquired from the previewer 8, with thecontent of the generation preview file 13, and returns the file name ofthe reference preview file 14 to the previewer 8. For instance, assumingthat a reference preview file number designated by the previewer 8 is 1,the content of a first reference preview file 14-1 is replaced, and thefile name of the first reference preview file 14-1 is returned to thepreviewer 8. If, for instance, a reference preview file numberdesignated by the previewer 8 is 2, the content of a second referencepreview file 14-2 is replaced with the content of the generation previewfile 13, and the file name of the second reference preview file 14-2 isreturned to the previewer 8. Note that although two reference previewfiles are described in this embodiment, the above description can beapplied to a case of employing one or three or more preview files.

Based on the reference preview file 14 having a file name returned bythe print processor 5, the previewer 8 acquires a preview imagecorresponding to the requested page number and printing conditions ofthe page, and displays the acquired preview image on the display device12 in accordance with the printing conditions. As a result, the previewimage 11 is obtained. The previewer 8, operated by a user, repeatscommunication with the print processor 5 to acquire a preview image tobe displayed next in accordance with the user operation. If thereference preview file 14 including a preview image to be displayed nexthas already been generated in the past and still exists, the previewer 8does not output a request to the print processor 5, but reuses thepreview image stored in the existing reference preview file 14. Thereplacement processing of the content of the reference preview file 14with the content of the generation preview file 13, which is performedby the print processor 5, may be realized by, for instance, copying thefile or renaming the file.

Since the flowchart for starting up the previewer 8 by the userinterface driver 3 is identical to the flowchart in FIG. 2 described inthe first embodiment, description thereof is omitted.

<Processing of Previewer 8>

Processing steps of the previewer 8 is shown in FIG. 8A. The previewer 8is started up by the user interface driver 3, and executes itsprocessing in response to an event notification from the print processor5 or user interface driver 3. Since the message or data exchange betweenthe previewer 8 and print processor 5 has already been described above,description thereof is omitted. The steps shown in FIG. 8A are the casewhere the previewer 8 is started up by the user interface driver 3.

In step S801, a page number of a preview image to be displayed isdesignated to 1 as an initial value, a resolution for performingprinting-image generation request is determined, and an initializationrequest is transmitted to the print processor 5. In steps S802 and S803,it is determined whether or not the designated page, subjected topreview displaying, has already been generated and stored as a referencepreview file. This determination is performed by referring to the tableshown in FIG. 8B and searching whether or not a designated page having adesignated resolution is registered. If a file is found, thecorresponding reference preview file exists. In the case where thecorresponding reference preview file exists, image data is read out ofthe reference preview file to display a preview image in step S806.However, in the case where the corresponding reference preview file doesnot exist, in step S804 the previewer designates a reference previewfile number where image data to be generated is to be stored, andtransmits a printing image generation request of the designated page tothe print processor 5. Thereafter, preview displaying is performed bythe steps described in the aforementioned brief description. After thepreviewer 8 transmits a printing image generation request of thedesignated page to the print processor 5 and receives the generatedreference preview file name from the print processor 5, the previewer 8updates the table shown in FIG. 8B, and the control proceeds to stepS802 to perform preview displaying. The previewer 8 updates the tableshown in FIG. 8B by append the file number, the file name, the pagenumber and the resolution of the generated preview image. After previewdisplaying is executed, in steps S807 and S809, the previewer 8 waitsfor a user input from the user interface shown in FIG. 4, and determineswhether or not the user input is a page number change or a resolutionchange. If the user input is a page number change or a resolutionchange, in step S810, the page number or resolution is changed to thedesignated page or designated resolution, and the control returns tostep S802 to change the preview display. Meanwhile, if the user input isnot a page number change or a resolution change, in step S811, it isdetermined whether or not the user input is a print end command. If so,a print end request is transmitted to the print processor 5 in stepS812. If the user input is not a print end command, a print startrequest is transmitted to the print processor 5 in step S813.

<Processing of Print Processor>

Next, print page processing of the print processor 5 according to thesecond embodiment is described with reference to the flowcharts in FIGS.7A and 7B which show a print page processing of the print processor 5.The print processor 5 performs print page processing in units of printjob. Note that steps in FIGS. 11A and 11B for executing the sameprocessing as those described in FIGS. 3A and 3B are referred to by thesame step numbers. Steps uniquely performed in FIGS. 7A and 7B are stepsS40 to S45.

In step S10, printing conditions of a print job is acquired from the EMFspool file. In step S11, it is determined whether or not preview displayexecution is set in the printing conditions. If preview displayexecution is not set, the control proceeds to step S12 to perform normalprinting. If preview display execution is set, the control proceeds tostep S40 to perform preview processing.

In step S40, a generation preview file 13 having an empty content isgenerated for storing a preview image and its printing conditions, andthe file name is informed to the printer graphic driver 6.

In step S22, a print start is informed to the printing system of the OS.

In step S23, the print processor waits for a request from the previewer8. If there is a request, the control proceeds to step S24 for acquiringa request of the previewer 8.

In step S41, the type of request from the previewer 8 is determined. Ifthe request is a preview initialization request, the control proceeds tostep S42 to determine an initialization operation, while if the requestis not a preview initialization request, the control proceeds to stepS25.

In step S42, it is determined whether or not initialization has alreadybeen performed. If initialization has already been performed, thecontrol proceeds to step S23 to wait for a request from the previewer 8.If initialization has not been performed, the control proceeds to stepS43 to perform initialization.

In step S43, the number of reference preview files 14 to be used isacquired based on the content of the request from the previewer 8, andreference preview files 14 having an empty content are generated for thenumber requested. Then, in step S23, the print processor waits for arequest from the previewer 8. At the time of initialization in step S43,fields of the table shown in FIG. 8B, which correspond to theinitialized files, are also initialized by, for instance, null data.

In step S25, the type of the request from the previewer 8 is determined.If it is a print start request, the control proceeds to step S35 toperform normal print processing. If it is not a print start request, thecontrol proceeds to step S26.

In step S35, the preview file generated in step S21 is eliminated, andnormal print processing is performed in step S12.

In step S26, the type of the request from the previewer 8 is determined,and if it is a print stop request, the control proceeds to step S36 toterminate print processing of the print job. If it is not a print stoprequest, the control returns to step S27.

In step S36, the preview file generated in step S21 is eliminated, andthe print processing of the print job ends in step S20.

In step S27, the type of the request from the previewer 8 is determined,and if it is a preview image generation request, the control proceeds tostep S28 to perform preview image generation processing. If it is not apreview image generation request, the control proceeds to step S34 toperform processing of other requests.

In step S34, processing is performed for a request other than the printstart request, print stop request, and preview image generation request,among various types of request from the previewer 8. For instance, ifthe total number of printable pages (total number of pages) isrequested, the total number of pages is prepared as a response to thepreviewer 8. For instance, if a request inquires whether or not theprinting data from the application program 1 is being spooled, a flagindicative of whether or not it is being spooled is prepared as aresponse to the previewer 8. After an appropriate response to therequest is generated, the response is transmitted to the previewer 8.Upon responding to the request, the control proceeds to step S23 to waitfor a request from the previewer.

In step S28, the content of the request transmitted by the previewer 8is acquired, and information necessary to perform preview imagegeneration is obtained. Herein, the content of the request transmittedby the previewer 8 is, for instance, information about a page number ofprinting page data to be generated by the print processor 5, the numberof pixels in the horizontal and vertical lengths of the preview image tobe generated, a resolution of a preview image to be generated, thenumber of colors or a subtractive color process employed in the previewimage generation, or the reference preview file number which is to storea preview image to be generated. The information about the content ofthe acquired request is informed to the printer graphic driver 6.

In step S44, the content of the generation preview file 13 is emptied,and printing conditions corresponding to the printing page data of therequested page number is stored in the generation preview file 13.

In step S30, a one-page print start is informed to the OS printingsystem.

In step S31, printing data is read out of the EMF spool file 4, andprinting page data corresponding to the page number requested by thepreviewer 8 is generated.

In step S32, one-page print completion is informed to the OS printingsystem. Herein, the printer graphic driver 6 generates a bitmap imagebased on the printing page data generated in step S31, and additionallystores the bitmap image in the generation preview file 13 as a previewimage.

In step S45, the content of the reference preview file 14 having therequested number is replaced with the content of the generation previewfile 13. In response to the preview image generation request from thepreviewer 8, a file name of the reference preview file 14 having therequested number is returned. Then, the control returns to step S23 towait for a request from the previewer 8. Needless to say, the necessarymemory capacity can be reduced by emptying the content of the generationpreview file 13 after the content of the reference preview file 14 isreplaced with the content of the generation preview file 13. Further,the previewer 8 registers the file name of the returned referencepreview file, resolution, and page number subjected to preview, in thetable shown in FIG. 8B with an established correlation.

Since steps S12 to S20 showing the actual print processing flow areidentical to the steps shown in FIG. 3A of the first embodiment, thedescription is omitted.

The print page processing of the print processor 5 shown in FIGS. 7A and7B is performed in the foregoing manner. Each time the print processor 5generates printing page data and informs one-page print completion instep S32, the printer graphic driver 6 generates bitmap data based onthe printing page data, and the generated bitmap data is additionallystored as a preview image in the generation preview file 13 having afile name informed in step S21. In step S45, the print processor 5replaces the content of the reference preview file 14 with the contentof the generation preview file 13, and returns the file name of thereference preview file 14 to the previewer 8. The previewer 8 acquiresthe preview image of the reference preview file 14 based on the returnedfile name, and displays a preview image on the display device 12.

Furthermore, each time the print processor 5 generates printing pagedata and informs one-page print completion in step S18, the printergraphic driver 6 which has received an actual print processing notice instep S12 generates bitmap data based on the printing page data, convertsthe bitmap data to a print command, and supplies it to the printer 7through a predetermined data transmission processing (not shown) forprinting a physical page.

Note that the maximum number of reference preview files generatable ispredetermined in the previewer 8. In step S804 in FIG. 8A, if the numberof files exceeds the maximum number, contents of the designated numberof reference preview files are initialized in order of earliest filesgenerated, and reused. Therefore, the memory area is kept to apredetermined size. By allowing a user to designate the maximum numberof reference preview files, it is possible to set the number of files inaccordance with the size of an available storage area. The userdesignation can be realized through, for instance, an input box orselection menu provided in the user interface screen in FIG. 4. Aninputted value is stored in a memory or magnetic disk as the maximumnumber of reference preview files, and referred in step S804. The fieldscorresponding to the initialized files in the preview page table 800,which are referred to by the previewer 8, are initialized in accordancewith the actual file status.

Since the user interface of the previewer 8 in the second embodiment issimilar to that shown in FIG. 4 described in the first embodiment,description thereof is omitted.

<Effect of Second Embodiment>

As described above, the second embodiment is characterized by employinga plurality of reference preview files 14 which are referred to by thepreviewer 8, and the generation preview file 13 where the printprocessor 5 and printer graphic driver 6 respectively store printingconditions and preview images.

By virtue of this characteristic, the previewer 8 can reuse a previewimage generated in the past by storing the image in the referencepreview file. As a result, the necessary storage area can be kept to aminimum. In addition, print preview displaying is realized efficientlywithout imposing a load on the print processor 5 or printer graphicdriver 6, which is caused by regenerating the same image.

Third Embodiment

Described as the third embodiment is a case of generating a previewimage by a server computer in a network print system, where a clientcomputer uses the server computer to perform printing.

Hereinafter, the third embodiment of the present invention is describedby using a concrete example.

FIG. 10 is a block diagram showing a data flow at the time of printingand print previewing in the printing system according to the thirdembodiment. Referring to FIG. 10, modules related to the presentinvention are: the previewer 8 serving as a printing-image display unit,user interface driver 3 having a function for starting up the previewer8 and including a print setting processor, print processor 5 serving asa print page processor, and printer graphic driver 6 serving as an imagegeneration processor. The printer graphic driver 6 not only transmitsgenerated printing data to a printer through an output function of anoperating system, but also stores a file as a designated file name. Theprinter graphic driver 6 can generate printing data in a bitmap-dataform or in a language processable by a printer. To execute previewing, apreview file 9, serving as a printing image file, is temporarilygenerated. Note in this embodiment, Windows provided by MicrosoftCorporation is employed as an operating system. Note that a differencebetween the first embodiment and the third embodiment is in that agraphic rendering command generated by the GDI 2 of a client 111 istransmitted to a server computer 112 and spooled into the EMF spool file4, and printing steps performed thereafter are executed by the servercomputer 112. Note in FIG. 10, although the line connecting the GDI 2 ofthe client computer 111 to the EMF spool file 4 of the server computeris shown independently of the line connecting the previewer 8 of theclient computer 111 to the print processor 5 of the server computer 112,they are merely a schematic representation of the connection statebetween the modules. Electrically, the client and server computers areconnected to the network 113 by, e.g., a single LAN cable.

The printing system in FIG. 10 is constructed such that printing data,e.g., a document, generated by the application program 1 operating inthe client computer 111, e.g., a personal computer, is temporarilystored in the EMF spool file 4 of the server computer 112 through theGDI 2, then the printing data is converted to bitmap data by the servercomputer 112, and the converted bitmap data is supplied from the servercomputer 112 to the printer 7 for printing. Note with respect to thesame configurations shown in FIGS. 1 and 10, detailed descriptions areomitted.

<Brief Description of Preview Displaying Steps>

When the application program 1 receives a designation to print adocument from a user, e.g., an operator or other programs, it transmitsa print start command through the GDI 2 to a printing system of the OSfor printing the document. The GDI 2 informs the user interface driver 3of a print start event transmitted by the application program 1. Whenthe user interface driver 3 receives the print start event, it starts upthe previewer 8 if preview display execution is set. Meanwhile, ifpreview display execution is not set, the previewer 8 is not started,and normal print processing is performed. In the following description,the case where preview display execution is set will be described.

The application program 1 continues print processing by supplying theGDI 2 with the printing data of the document. The printing data suppliedthrough the GDI 2 is stored in the EMF spool file 4 of the servercomputer 112 via the network 113.

The print processor 5 operating in the server computer 112 is a modulewhich reads in page unit the printout information and printing data fromthe EMF spool file 4 to generate printing page data, and supplies theprinting page data to the printer graphic driver 6 through the GDI 13 ofthe server computer 112, when printing is to be executed in Windows. Theprint processor 5 in this embodiment, which is a module realizing theforegoing functions, serves also as the print page processor, and has afunction to acquire a printing image generation request informed by thepreviewer 8 by communicating with the previewer 8 of the client computer111 through the network 113. The printing image generation requestincludes information necessary for generating a printing image, e.g., apage number, resolution, and so on.

When the print processor 5 receives the printing image generationrequest, the print processor 5 generates an empty preview file 9, andnotifies the file name to the printer graphic driver 6 through the GDI13 to inform of the preview processing. Next, the print processor writesprinting conditions of the page number, on which preview displaying isrequested, in the preview file 9. Then, the print processor 5 reads thepage of the document data necessary for printing-image generation fromthe EMF spool file 4, and generates printing page data of the requestedpage number to be supplied to the GDI 13.

The printer graphic driver 6, serving as an image generation processor,generates bitmap data based on a graphic rendering command, which isgenerated by the GDI 13 based on the printing page data supplied by theprint processor 5. The printer graphic driver 6 additionally stores thegenerated bitmap data in the preview file 9 as preview image data, usingthe preview file name notified in advance by the print processor 5. Whenthe printer graphic driver 6 completes generation of the requestedpreview image data, it notifies the completion as a response to theprint processor 5.

After the printer graphic driver 6 completes storing the preview imagedata, the print processor 5 transmits the content of the preview file 9to the previewer 8 of the client computer 112. The preview file 9includes the printing conditions stored by the print processor 5, andpreview image data stored by the printer graphic driver 6.

The previewer 8 of the client computer 111 acquires from the previewfile 9 transmitted by the print processor 5 the preview image datacorresponding to the requested page number and printing conditions ofthe page, displays the preview image on the display device 12 serving asdisplay means, and obtains a preview image 11. The previewer 8, operatedby a user through the user interface driver 3, repeats communicationwith the print processor 5 to acquire a preview image to be displayednext in accordance with the user operation. Note that the preview file 9may be eliminated when it is transmitted from the server computer 112 tothe client computer 111. The elimination of the preview file may bedelayed until next preview file generation is requested. Further, asingle preview file may be used by overwriting the content until previewdisplay processing is completed, and may be eliminated when a printstart or print end request is received.

As has been described above, by virtue of having the printer graphicdriver 6 generate not only printing data but also preview image data, itis possible to generate preview image data based on the printing dataspooled by an operating system. Furthermore, since preview image data isgenerated in designated page unit, the storage area necessary forstoring the preview image data is kept to one page at most, even in acase the image data has a highest resolution.

<Processing of Print Processor>

Print page processing of the print processor 5 according to the thirdembodiment is described with reference to the flowcharts in FIGS. 11Aand 11B which show a print page processing of the print processor 5.

The print processor 5 starts the processing steps in FIGS. 11A and 11Bwhen it receives a print image generation request from the previewer 8of the client computer 111. The print page processing performed by theprint processor 5, shown in FIGS. 11A and 11B, is executed in units ofprint job. Note that steps in FIGS. 7A and 7B for executing the sameprocessing as those described in FIGS. 3A and 3B are referred to by thesame step numbers.

In step S10, printing conditions of the print job is acquired from theEMF spool file. In step S11, it is determined whether or not previewdisplay execution is set in the printing conditions. If preview displayexecution is not set, the control proceeds to step S12 to perform normalprinting. If preview display execution is set, the control proceeds tostep S21 to perform preview processing.

<Preview Processing>

In step S21, a preview file 9 having an empty content is generated forstoring a preview image and its printing conditions, and the file nameis informed to the printer graphic driver 6.

In step S22, a print start is informed to the printing system of the OS(i.e., GDI 2).

In step S23, the print processor waits for a request from the previewer8. If there is a request, the control proceeds to step S24 for acquiringa request of the previewer 8. Herein, a request is realized by a messagehaving a predetermined form for communication between processes.

In step S25, the type of the request from the previewer 8 is determined.If it is a print start request, the control proceeds to step S35 toperform normal print processing. If it is not a print start request, thecontrol proceeds to step S26.

In step S35, the preview file 9 generated in step S21 is eliminated, andnormal print processing is performed in step S12.

In step S26, the type of the request from the previewer 8 is determined,and if it is a print stop request, the control proceeds to step S36 toterminate print processing of the print job. If it is not a print stoprequest, the control returns to step S27.

In step S36, the preview file 9 generated in step S21 is eliminated, andthe print processing of the print job ends in step S20.

In step S27, the type of the request from the previewer 8 is determined,and if it is a preview image generation request, the control proceeds tostep S28 to perform preview image generation processing. If it is not apreview image generation request, the control proceeds to step S34 toperform processing of other requests.

In step S34, processing is performed for a request other than the printstart request, print stop request, and preview image generation request,among various types of request from the previewer 8. For instance, ifthe total number of printable pages is requested, the total number ofpages is prepared as a response to the previewer 8. For instance, if arequest inquires whether or not the printing data from the applicationprogram 1 is being spooled, a flag indicative of whether or not it isbeing spooled is prepared as a response to the previewer 8. After anappropriate response to the request is generated, the response istransmitted to the previewer 8. Upon responding to the request, thecontrol proceeds to step S23 to wait for a request from the previewer.

In step S28, the content of the request transmitted by the previewer 8is acquired, and information necessary to perform preview imagegeneration is obtained. Herein, the content of the request transmittedby the previewer 8 is, for instance, information about a page number ofprinting page data to be generated by the print processor 5, the numberof pixels in the horizontal and vertical lengths of the preview image tobe generated, a resolution of a preview image to be generated, or anumber of colors or subtractive color process employed in the previewimage generation. As a matter of course, the content of the request maybe any one of the aforementioned information, or a combination of pluralinformation. Note that the page number is essential information. Theinformation about the content of the acquired request is informed to theprinter graphic driver 6.

In step S29, the content of the preview file 9 is emptied, and printingconditions corresponding to the printing page data of the requested pagenumber is stored in the preview file 9.

In step S30, a one-page print start is informed to the OS printingsystem through the GDI 13.

In step S31, printing data is read out of the EMF spool file 4, andprinting page data corresponding to the page number requested by thepreviewer 8 is generated and transmitted to the GDI 2.

In step S32, one-page print completion is informed through the GDI 13 tothe OS printing system. Herein, the GDI 13 generates a graphic renderingcommand based on the printing page data, and transmits it to the printergraphic driver 6. The printer graphic driver 6 generates a bitmap imagebased on the graphic rendering command transmitted by the GDI 13, andadditionally stores the bitmap image in the preview file 9 as a previewimage.

In step S1101, the content of the preview file is transmitted inresponse to the preview image generation request of the previewer 8, andthe control proceeds to step S23 to wait for the next request from thepreviewer 8. If any request is transmitted from the previewer 8, theabove-described processing is performed in accordance with the requestcontent.

<Print Processing>

In step S12, the print processor 5 informs the printer graphic driver 6of a start of actual print processing.

In step S13, it is determined whether or not a print start has alreadybeen informed to the OS printing system. If so, the control proceeds tostep S15 to perform printing of each page. If not, the control proceedsto step S14 to inform the OS printing system of a print start.

Steps S15 to S19 are looped until printing of each physical page isperformed to the final physical page. In step S19, if printing for allthe designated physical pages is not completed, printing processing of aphysical page continues in step S16. When printing for all thedesignated physical pages is completed, the control proceeds to step S20where print processing completion is informed to the OS printing system.

In step S16, a one-page print start is informed to the OS printingsystem.

In step S17, the GDI 13 reads the printing data out of the EMF spoolfile 4, and generates printing page data corresponding to each physicalpage.

In step S18, the one-page print completion is informed to the OSprinting system (GDI 13). The GDI 13 generates a graphic renderingcommand based on the printing page data, and transmits it to the printergraphic driver 6. The printer graphic driver 6 generates a bitmap imagebased on the graphic rendering command transmitted by the GDI 13, andsupplies it to the printer 7.

In step S20, print completion is informed to the OS printing system andthe control ends.

Print page processing of the print processor 5 shown in FIGS. 11A and11B is performed in the foregoing manner. Each time the print processor5 generates printing page data and informs the one-page print completionto the GDI 13 in step S32, the GDI 13 generates a graphic renderingcommand based on the printing page data and transmits it to the printergraphic driver 6. The printer graphic driver 6 generates bitmap databased on the graphic rendering command transmitted by the GDI 13. Thegenerated bitmap data is additionally stored in the preview file 9having a file name informed by the print processor 5 in step S21.

The previewer 8 acquires a preview image of a designated page numberfrom the preview file 9 having a file name transmitted by the printprocessor 5 in step S1101, and displays the preview image 11 on thedisplay device 12.

Furthermore, each time the print processor 5 generates printing pagedata and informs one-page print completion to the GDI 13 in step S18,the printer graphic driver 6 which has received an actual printprocessing notice in step S12 generates bitmap data based on theprinting page data, converts the bitmap data to a print command, andsupplies it to the printer 7 through a predetermined data transmissionprocessing (not shown) for printing a physical page. Note that theprinter graphic driver 6, which may be capable of generating pluralforms of printing data, does not always generate printing data in abitmap form, but may generate printing data in a designated form oflanguage. However, this is the printing data to be supplied to aprinter. Therefore, a preview image is generated in a bitmap form.

The server computer and client computer are configured with the hardwareshown in FIG. 5, and the network interface (not shown).

<Effect of Third Embodiment>

As described above, when the print processor 5 supplies the printergraphic driver 6 with printing page data, the print processor 5 informsas to whether or not to generate a preview image as well as informationnecessary to generate the preview image, then generates printing pagedata by reading printing data out of the EMF spool file 4, and theprinter graphic driver 6 generates a preview image that is a printingimage based on the printing page data. Accordingly, preview imagegeneration can be performed by using a standard spool function of anoperating system, and therefore maintenance of the driver program isfacilitated.

Furthermore, since a printing image does not need to be regeneratedbased on the print command transmitted to the printer 7, preview imagegeneration can be realized with a small storage area.

Moreover, since a resolution most appropriate for displaying is obtainedfrom the previewer 8, generating a larger preview image than isnecessary can be prevented, and therefore, the amount of datatransmitted to the network can be kept small.

The third embodiment can be combined with the second embodiment. In thiscase, a content of the reference preview file generated is transmittedfrom the server computer to the client computer, and the preview imageis displayed on the client computer.

EFFECTS OF PRESENT INVENTION

As has been set forth above, according to the present invention, since aresolution of a printing image can be designated from the previewer, aprinting image having a size appropriate for displaying can begenerated, and the necessary storage area can be kept to a minimum.

Furthermore, by virtue of using an OS standard spool function, themethod according to this invention has a high affinity to the OS.Therefore, future maintenance is facilitated, and a development cost canbe suppressed.

Moreover, in a printing system connected to a network, since previewimage generation is performed by a server computer, a load imposed on aclient computer can be reduced.

Still further, in the printing system connected to a network, image datahaving a resolution appropriate for preview displaying can be obtained.Therefore, it is possible to prevent transmission of unnecessarily largeamount of data to the network, contributing to prevention of anincreased network traffic.

The present invention is not limited to the above embodiment and variouschanges and modifications can be made within the spirit and scope of thepresent invention. Therefore, to apprise the public of the scope of thepresent invention, the following claims are made.

1. A print control apparatus using a spool file provided by an operatingsystem to temporarily store intermediate data to be outputted inaccordance with a print designation of document data, comprising: a userinterface driver constructed to activate a previewer for displayingimage data when receiving a print start event if a preview setting isset; and a print processor constructed to generate a preview file, toread the temporarily stored intermediate data from the spool file, tocause an image data generator to generate image data from theintermediate data and to save the image data in the preview file, and toinform said previewer of a file identifier of the preview file inresponse to an image generation request from the previewer activated bysaid user interface driver, wherein said previewer reads the image datafrom the preview file based upon the file identifier and displays theimage data.
 2. The print control apparatus according to claim 1, whereinthe image generation request involves designation of a size orresolution of the image data to be generated, and said print processorcauses said image data generator to generate the image data with thedesignated size or resolution.
 3. The print control apparatus accordingto claim 1, wherein the image generation request includes a page numbersubjected to image data generation among a total number of pages to beprinted, and said print processor reads the intermediate data to causesaid image data generator to generate image data which corresponds tothe designated page number.
 4. The print control apparatus according toclaim 1, wherein the image generation request includes a number ofcolors used in bitmap data to be stored in a printing image file, or asubtractive color process employed in bitmap data generation.
 5. Theprint control apparatus according to claim 1, wherein said printprocessor produces a designated number of files for storing the imagedata to be generated by said image data generator, and stores the imagedata generated by said image data generator in the files, and in a casewhere image data corresponding to the printing image designated forscreen display execution is stored in the file, said previewer reads theimage data out of the file and displays the image data.
 6. The printcontrol apparatus according to claim 1, wherein said previewer meanstransmits an inquiry to said print processor as to whether or notprinting data subjected to printing is stored as intermediate data, andsaid print processor returns a response to the inquiry to saidpreviewer.
 7. The print control apparatus according to claim 6, whereinsaid previewer further transmits an inquiry to said print processor asto a total number of pages to be outputted at the time of actuallyprinting the document data subjected to printing, and said printprocessor returns a response to the inquiry to said previewer.
 8. Theprint control apparatus according to claim 1, wherein said previewer isincluded in a client apparatus which transmits the print designation ofdocument data, and said image data generator and said print processormeans are included in a server apparatus which is connected to aprinting apparatus and the client apparatus, wherein said printprocessor supplies said previewer with the image data itself asinformation related to the generated image data.
 9. The print controlapparatus according to claim 1, wherein said print processor reads thetemporarily stored intermediate data in accordance with a print startrequest, to cause said image data generator to generate printing data,and printing is performed by a printing apparatus based on the generatedprinting data.
 10. A print control method of controlling an apparatususing a spool file provided by an operating system for temporarilystoring intermediate data to be outputted in accordance with a printdesignation of document data, said method comprising: an activating stepof activating previewer for displaying image data when receiving a printstart event if a preview setting is set; a processing step of generatinga preview file, reading the temporarily stored intermediate data fromthe spool file, causing an image data generator to generate image datafrom the intermediate data and to save the image data in the previewfile, and informing said previewer of a file identifier of the previewfile in response to an image generation request from the previeweractivated in said activating step; a step of reading the image data fromthe preview file based upon the file identifier; and a displaying stepof displaying the image data.
 11. The print control method according toclaim 10, wherein in said processing step, the image data is generatedby the image data generator with a designated size or resolution. 12.The print control method according to claim 10, wherein in saidprocessing step, the intermediate data is read to cause the image datagenerator to generate image data which corresponds to a page numbersubjected to image data generation among a total number of pages to beprinted.
 13. The print control method according to claim 10, wherein insaid processing step, the image data is generated by the image datagenerator with a designated number of colors or a subtractive colorprocess employed in bitmap data generation.
 14. The print control methodaccording to claim 10, wherein in said processing step, a designatednumber of files is produced for storing the image data to be generatedby the image data generator, and the image data generated by the imagedata generator is stored in the files, and in said displaying step, in acase where image data corresponding to the printing image designated forscreen display execution is stored in the file, the image data is readout of the file and displayed.
 15. The print control method according toclaim 10, wherein said display step is executed by a client apparatuswhich transmits the print designation of document data, and saidprocessing step is executed by a server apparatus which is connected toa printing apparatus and the client apparatus and includes the imagedata generator.
 16. The print control method according to claim 10,further comprising a printing step of reading the temporarily storedintermediate data in accordance with a print start request to cause theimage data generator to generate printing data, and causing a printingapparatus to perform printing based on the generated printing data. 17.A print control program which is stored in a computer readable storagemedium and which is executable by a computer operating under anoperating system included in the computer, wherein the operating systemuses a spool file provided by the operating system for temporarilystoring intermediate data to be outputted, said program causing thecomputer to perform a method comprising: an activating step ofactivating a previewer for displaying image data when receiving a printstart event if preview setting is set; a processing step of generating apreview file, reading the temporarily stored immediate data from thespool file, causing an image data generator to generate image data fromthe intermediate data and to save the image data in the preview file,and informing said previewer of a file identifier of the preview file inresponse to an image generation request from the previewer activated insaid activating step; a step of reading the image data from the previewfile based upon the file identifier; and a displaying step of displayingthe image data.
 18. The computer program according to claim 17, whereinin said processing step, the image data is generated by the image datagenerator with the designated size or resolution.
 19. The computerprogram according to claim 17, wherein in said processing step, theintermediate data is read to cause the image data generator to generateimage data which corresponds to a page number subjected to image datageneration among a total number of pages to be printed.
 20. The computerprogram according to claim 17, wherein in said processing step, theimage data is generated by the image data generator with a designatednumber of colors or a subtractive color process employed in bitmap datageneration.
 21. The computer program according to claim 17, wherein insaid processing step a designated number of files is produced forstoring the image data to be generated by said image data generator, andthe image data generated by said image data generator is stored in thefiles, and in said displaying step, in a case where image datacorresponding to the printing image designated for screen displayexecution is stored in the file, the image data is read out of the fileand displayed.
 22. The computer program according to claim 17, whereinsaid previewer transmits an inquiry to processor as to whether or notprinting data subjected to printing is stored as intermediate data, andthe print processor returns a response to the inquiry to said previewer.23. The computer program according to claim 22, wherein said previewerfurther transmits an inquiry to said print processor as to a totalnumber of pages to be outputted at the time of actually printingdocument data subjected to printing, and said print processor returns aresponse to the inquiry to said previewer.
 24. The computer programaccording to claim 17, further comprising a printing step of reading thetemporarily stored intermediate data in accordance with a print startrequest, to cause said image data generator to generate printing data,and causing a printing apparatus to perform printing based on thegenerated printing data.
 25. A computer-readable recording mediumrecording the computer program described in claim 17.